Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Latest commit

 

History

History
23 lines (16 loc) · 693 Bytes

13.11.1 - epoll_wait 偶尔会用很长时间.md

File metadata and controls

23 lines (16 loc) · 693 Bytes

epoll_wait 偶尔会用很长时间

问题描述

epoll_wait偶尔会用很长时间

问题出现的环境背景及自己尝试过哪些方法

strace 跟踪

相关代码

21605      0.000043 semop(38830083, {{0, -1, SEM_UNDO}}, 1) = 0
21605      0.611909 epoll_wait(30, {{EPOLLIN, {u32=25218632, u64=25218632~~~, 4, 10000) = 1
21605      0.103429 accept4(3, {sa_family=AF_INET, sin_port=htons(56826), sin_addr=inet_addr("ip address")}, [16], SOCK_CLOEXEC) = 33
21605      0.000059 semop(38830083, {{0, 1, SEM_UNDO}}, 1) = 0

回复

epoll_wait 时间很长,说明在这段时间内没有任何事件发生,epoll 是空闲状态,这是正常现象。